﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EnvDTE;
using EnvDTE80;
using EnvDTE90;
using EnvDTE100;
using Microsoft.VisualStudio.CommandBars;

namespace GnProjectAssist
{
    public static class GnAssist
    {
        static private DTE mApplication = null;
        static public DTE Application
        {
            get { return mApplication; }
        }
        static private CommandBars mCommandBars = null;
        static public CommandBars CommandBars
        {
            get { return mCommandBars; }
        }

        public static void Startup( DTE application )
        {
            //Debug.Assert( ( application != null && addInInst != null ) );
            mApplication = application;
            mCommandBars = mApplication.DTE.CommandBars as CommandBars;
        }

        public static CommandBar GetCommandBar( String value )
        {
#region BeforeDefine
#if DEBUG
            CommandBar ss;
            for( int i = 1 ; i < mCommandBars.Count ; i++ )
            {
                ss = mCommandBars[i];
            }
#endif
#endregion
            return mCommandBars[value];
        }
    }
}
